<?php
class M_table extends CI_Model{
	public function __construct()
	{
		parent::__construct();
		// Your own constructor code
	}
    public function getTableBaigiang($khoa)
    {     
        $this->db->select('*');
        $this->db->from('baigiang');
		$this->db->where('subject', $khoa);
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
     public function get_select_cntt()
    {     
        $this->db->select('*');
        $this->db->from('khoahoc');
        $this->db->where('id_nganh','1');
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
       public function get_select_xd()
    {     
        $this->db->select('*');
        $this->db->from('khoahoc');
        $this->db->where('id_nganh','2');
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
    
       public function get_select_tc()
    {     
        $this->db->select('*');
        $this->db->from('khoahoc');
        $this->db->where('id_nganh','3');
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
       public function get_select_ta()
    {     
        $this->db->select('*');
        $this->db->from('khoahoc');
        $this->db->where('id_nganh','4');
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
    
       public function get_select_qt()
    {     
        $this->db->select('*');
        $this->db->from('khoahoc');
        $this->db->where('id_nganh','5');
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
       public function get_select_kt()
    {     
        $this->db->select('*');
        $this->db->from('khoahoc');
        $this->db->where('id_nganh','6');
        $result = $this->db->get();
        return $result;
        $result->free_result();
    }
    
    
    
    
     
}
